This is the analysis script to prepare the data to run analyses for the project “Anxiety, depression and trauma symptom change during the COVID-19 pandemic: retrospective versus objective assessment” - Young et al (2020)
Script written by K L Purves, K N Thompson, C Huebel and M Davies. Email: kirstin.purves@kcl.ac.uk, katie.thompson@kcl.ac.uk, christopher.1.huebel@kcl.ac.uk, molly.davies@kcl.ac.uk
#Set up
Clear global environment
Retrieve the current date to use it for file endings to not overwrite files when one exports files
#Packages Install packages (if they are not available in your version of R)
Load packages
Registered S3 method overwritten by 'pryr':
method from
print.bytes Rcpp
For best results, restart R session and update pander using devtools:: or remotes::install_github('rapporter/pander')
Attaching package: 'polycor'
The following object is masked from 'package:psych':
polyserial
corrplot 0.84 loaded
── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.2 ✓ purrr 0.3.4
✓ tibble 3.0.4 ✓ dplyr 1.0.2
✓ tidyr 1.1.2 ✓ stringr 1.4.0
✓ readr 1.3.1 ✓ forcats 0.5.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
x ggplot2::%+%() masks psych::%+%()
x ggplot2::alpha() masks psych::alpha()
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
x tibble::view() masks summarytools::view()
Define colours for plotting this are the standard coping colours
Choose in this chunk which palette to use 04.07.2020 - Default to 2 colour COPING palette
Set up ggplot theme for the plots
[1] "/Users/kirstin/King's College London/MT-TNG BioResource EDIT - COPING_analysis - COPING_analysis/PANCHANGE/data/"
[1] 31884 641
[1] "Sample"
[2] "ID"
[3] "startDate.prepandemic"
[4] "Age_uncleaned"
[5] "Gender_unc"
[6] "Sex"
[7] "EduYrs"
[8] "demographics.college_or_university_degree"
[9] "demographics.a_levelsas_levels_or_equivalent"
[10] "demographics.o_levelsgcses_or_equivalent"
[11] "demographics.cses_or_equivalent"
[12] "demographics.nvq_or_hnd_or_hnc_or_equivalent"
[13] "Ethnicity_unc"
[14] "Gender_numeric"
[15] "Sex_numeric"
[16] "demographics.college_or_university_degree_numeric"
[17] "demographics.a_levelsas_levels_or_equivalent_numeric"
[18] "demographics.o_levelsgcses_or_equivalent_numeric"
[19] "demographics.cses_or_equivalent_numeric"
[20] "demographics.nvq_or_hnd_or_hnc_or_equivalent_numeric"
[21] "Ethnicity_numeric"
[22] "Gender"
[23] "Ethnicity"
[24] "Age"
[25] "age_category_numeric"
[26] "age_category"
[27] "highest_education_prepan_numeric"
[28] "highest_education_prepan"
[29] "employment.phd"
[30] "employment.masters_degree_or_equivalent"
[31] "employment.postgraduate_degree_or_equivalent"
[32] "employment.bachelors_degree_or_equivalent"
[33] "employment.a_levelsas_levels_or_equivalent"
[34] "employment.o_levelsgcses_or_equivalent"
[35] "employment.cses_or_equivalent"
[36] "employment.nvq_or_hnd_or_hnc_or_equivalent"
[37] "employment.government_work_key_workers"
[38] "employment.unemployed"
[39] "employment.zerohours_contract"
[40] "employment.stayathome_parent_or_carer"
[41] "employment.retired"
[42] "employment.student_gcse_or_a_level"
[43] "employment.student_university"
[44] "employment.became_unemployed"
[45] "employment.furloughed_or_paid_leave_government_funded"
[46] "employment.furloughed_or_paid_leave_company_funded"
[47] "employment.paid_leave_furloughed"
[48] "employment.fulltime_employed"
[49] "employment.parttime_employed"
[50] "employment.selfemployed"
[51] "employment.contract_or_freelance_work"
[52] "employment.small_business_owner"
[53] "employment.receiving_state_income"
[54] "employment.my_employment_status_has_not_changed"
[55] "employment.reduction_in_hours"
[56] "employment.reduction_in_salary"
[57] "employment.benefits_increased"
[58] "employment.benefits_decreased"
[59] "employment.became_employed"
[60] "employment.increased_hours"
[61] "employment.increased_salary"
[62] "employment.phd_numeric"
[63] "employment.masters_degree_or_equivalent_numeric"
[64] "employment.postgraduate_degree_or_equivalent_numeric"
[65] "employment.bachelors_degree_or_equivalent_numeric"
[66] "employment.a_levelsas_levels_or_equivalent_numeric"
[67] "employment.o_levelsgcses_or_equivalent_numeric"
[68] "employment.cses_or_equivalent_numeric"
[69] "employment.nvq_or_hnd_or_hnc_or_equivalent_numeric"
[70] "employment.government_work_key_workers_numeric"
[71] "employment.unemployed_numeric"
[72] "employment.zerohours_contract_numeric"
[73] "employment.stayathome_parent_or_carer_numeric"
[74] "employment.retired_numeric"
[75] "employment.student_gcse_or_a_level_numeric"
[76] "employment.student_university_numeric"
[77] "employment.became_unemployed_numeric"
[78] "employment.furloughed_or_paid_leave_government_funded_numeric"
[79] "employment.furloughed_or_paid_leave_company_funded_numeric"
[80] "employment.paid_leave_furloughed_numeric"
[81] "employment.fulltime_employed_numeric"
[82] "employment.parttime_employed_numeric"
[83] "employment.selfemployed_numeric"
[84] "employment.contract_or_freelance_work_numeric"
[85] "employment.small_business_owner_numeric"
[86] "employment.receiving_state_income_numeric"
[87] "employment.my_employment_status_has_not_changed_numeric"
[88] "employment.reduction_in_hours_numeric"
[89] "employment.reduction_in_salary_numeric"
[90] "employment.benefits_increased_numeric"
[91] "employment.benefits_decreased_numeric"
[92] "employment.became_employed_numeric"
[93] "employment.increased_hours_numeric"
[94] "employment.increased_salary_numeric"
[95] "highest_education_numeric"
[96] "highest_education"
[97] "employment_prior_covid_numeric"
[98] "employment_prior_covid"
[99] "employment_change_numeric"
[100] "employment_change"
[101] "key_worker_numeric"
[102] "key_worker"
[103] "anxiety_disorders_numeric"
[104] "anxiety_disorders"
[105] "mhd.specific_phobia_e.g._phobia_of_flying_numeric"
[106] "mhd.specific_phobia_e.g._phobia_of_flying"
[107] "mhd.social_anxiety_or_social_phobia_numeric"
[108] "mhd.social_anxiety_or_social_phobia"
[109] "agoraphobia_panic_disorder_numeric"
[110] "agoraphobia_panic_disorder"
[111] "depressive_disorders_numeric"
[112] "depressive_disorders"
[113] "eating_disorders_numeric"
[114] "eating_disorders"
[115] "obsessive_compulsive_disorders_numeric"
[116] "obsessive_compulsive_disorders"
[117] "psychotic_disorders_numeric"
[118] "psychotic_disorders"
[119] "mhd.mania_hypomania_bipolar_or_manicdepression_numeric"
[120] "mhd.mania_hypomania_bipolar_or_manicdepression"
[121] "mhd.posttraumatic_stress_disorder_ptsd_numeric"
[122] "mhd.posttraumatic_stress_disorder_ptsd"
[123] "autism_spectrum_disorder_numeric"
[124] "autism_spectrum_disorder"
[125] "mhd.attention_deficit_hyperactivity_disorder_numeric"
[126] "mhd.attention_deficit_hyperactivity_disorder"
[127] "mhd.personality_disorder_numeric"
[128] "mhd.personality_disorder"
[129] "personality_cluster_a_numeric"
[130] "personality_cluster_a"
[131] "personality_cluster_b_numeric"
[132] "personality_cluster_b"
[133] "personality_cluster_c_numeric"
[134] "personality_cluster_c"
[135] "depression_and_anxiety_numeric"
[136] "depression_and_anxiety"
[137] "restricting_vs_binge_eating_eating_disorders_numeric"
[138] "restricting_vs_binge_eating_eating_disorders"
[139] "bipolar_and_schizophrenia_numeric"
[140] "bipolar_and_schizophrenia"
[141] "control_numeric"
[142] "control"
[143] "disorders_total_count"
[144] "comorbidity_total_count_numeric"
[145] "comorbidity_total_count_factor_numeric"
[146] "comorbidity_total_count_factor"
[147] "mhd.none_of_the_above"
[148] "mhd.none_of_the_above.1"
[149] "gad.feeling_nervous_anxious_or_on_edge_prepan"
[150] "gad.control_worrying_stop_prepan"
[151] "gad.worrying_too_much_about_different_things_prepan"
[152] "gad.trouble_relaxing_prepan"
[153] "gad.sit_restless_hard_prepan"
[154] "gad.becoming_easily_annoyed_or_irritable_prepan"
[155] "gad.awful_feeling_afraid_happen_prepan"
[156] "gad.feeling_nervous_anxious_or_on_edge_prepan_numeric"
[157] "gad.control_worrying_stop_prepan_numeric"
[158] "gad.worrying_too_much_about_different_things_prepan_numeric"
[159] "gad.trouble_relaxing_prepan_numeric"
[160] "gad.sit_restless_hard_prepan_numeric"
[161] "gad.becoming_easily_annoyed_or_irritable_prepan_numeric"
[162] "gad.awful_feeling_afraid_happen_prepan_numeric"
[163] "gad.sum_score_prepan_raw"
[164] "na_per_person_gad_prepan"
[165] "gad.sum_score_prepan"
[166] "pcl.stressful_experience_repeated_images_prepan"
[167] "pcl.stressful_experience_upset_reminded_prepan"
[168] "pcl.stressful_situation_avoiding_activities_prepan"
[169] "pcl.cut_people_feeling_distant_prepan"
[170] "pcl.feeling_irritable_or_having_angry_outbursts_prepan"
[171] "pcl.difficulty_concentrating_prepan"
[172] "pcl.stressful_experience_repeated_images_prepan_numeric"
[173] "pcl.stressful_experience_upset_reminded_prepan_numeric"
[174] "pcl.stressful_situation_avoiding_activities_prepan_numeric"
[175] "pcl.cut_people_feeling_distant_prepan_numeric"
[176] "pcl.feeling_irritable_or_having_angry_outbursts_prepan_numeric"
[177] "pcl.difficulty_concentrating_prepan_numeric"
[178] "pcl.sum_score_prepan_raw"
[179] "na_per_person_pcl_prepan"
[180] "pcl.sum_score_prepan"
[181] "phq.little_interest_or_pleasure_in_doing_things_prepan"
[182] "phq.feeling_down_depressed_or_hopeless_prepan"
[183] "phq.staying_asleep_sleeping_trouble_prepan"
[184] "phq.feeling_tired_or_having_little_energy_prepan"
[185] "phq.poor_appetite_or_overeating_prepan"
[186] "phq.feeling_bad_failure_family_prepan"
[187] "phq.trouble_concentrating_reading_newspaper_prepan"
[188] "phq.moving_fidgety_noticed_opposite_prepan"
[189] "phq.dead_hurting_thoughts_prepan"
[190] "phq.little_interest_or_pleasure_in_doing_things_prepan_numeric"
[191] "phq.feeling_down_depressed_or_hopeless_prepan_numeric"
[192] "phq.staying_asleep_sleeping_trouble_prepan_numeric"
[193] "phq.feeling_tired_or_having_little_energy_prepan_numeric"
[194] "phq.poor_appetite_or_overeating_prepan_numeric"
[195] "phq.feeling_bad_failure_family_prepan_numeric"
[196] "phq.trouble_concentrating_reading_newspaper_prepan_numeric"
[197] "phq.moving_fidgety_noticed_opposite_prepan_numeric"
[198] "phq.dead_hurting_thoughts_prepan_numeric"
[199] "phq.sum_score_prepan_raw"
[200] "na_per_person_phq_prepan"
[201] "phq.missing_only_suicide_item_prepan"
[202] "phq.sum_score_prepan"
[203] "phq.sum_score_8items_prepan"
[204] "ocir.i_repeatedly_check_doors_windows_drawers_etc_prepan"
[205] "ocir.arranged_things_change_upset_prepan"
[206] "ocir.repeat_feel_numbers_prepan"
[207] "ocir.clean_simply_wash_feel_prepan"
[208] "ocir.mind_upset_unpleasant_thoughts_prepan"
[209] "ocir.afraid_avoid_throwing_things_prepan"
[210] "ocir.light_switches_water_taps_prepan"
[211] "ocir.arranged_things_prepan"
[212] "ocir.good_feel_bad_numbers_prepan"
[213] "ocir.hands_longer_wash_prepan"
[214] "ocir.saved_things_prepan"
[215] "ocir.frequently_difficulty_rid_nasty_prepan"
[216] "ocir.i_check_things_more_often_than_necessary_prepan"
[217] "ocir.arranged_properly_objects_upset_prepan"
[218] "ocir.feel_compelled_count_things_prepan"
[219] "ocir.strangers_touch_touched_difficult_prepan"
[220] "ocir.control_difficult_find_thoughts_prepan"
[221] "ocir.i_collect_things_i_dont_need_prepan"
[222] "ocir.i_repeatedly_check_doors_windows_drawers_etc_prepan_numeric"
[223] "ocir.arranged_things_change_upset_prepan_numeric"
[224] "ocir.repeat_feel_numbers_prepan_numeric"
[225] "ocir.clean_simply_wash_feel_prepan_numeric"
[226] "ocir.mind_upset_unpleasant_thoughts_prepan_numeric"
[227] "ocir.afraid_avoid_throwing_things_prepan_numeric"
[228] "ocir.light_switches_water_taps_prepan_numeric"
[229] "ocir.arranged_things_prepan_numeric"
[230] "ocir.good_feel_bad_numbers_prepan_numeric"
[231] "ocir.hands_longer_wash_prepan_numeric"
[232] "ocir.saved_things_prepan_numeric"
[233] "ocir.frequently_difficulty_rid_nasty_prepan_numeric"
[234] "ocir.i_check_things_more_often_than_necessary_prepan_numeric"
[235] "ocir.arranged_properly_objects_upset_prepan_numeric"
[236] "ocir.feel_compelled_count_things_prepan_numeric"
[237] "ocir.strangers_touch_touched_difficult_prepan_numeric"
[238] "ocir.control_difficult_find_thoughts_prepan_numeric"
[239] "ocir.i_collect_things_i_dont_need_prepan_numeric"
[240] "ocir.sum_score_prepan_raw"
[241] "na_per_person_ocir_prepan"
[242] "ocir.sum_score_prepan"
[243] "startDate.coping"
[244] "gad.problems_made_difficult_care"
[245] "gad.pandemic_felt_feelings"
[246] "gad.feeling_nervous_anxious_or_on_edge_retro"
[247] "gad.control_worrying_stop_retro"
[248] "gad.worrying_too_much_about_different_things_retro"
[249] "gad.trouble_relaxing_retro"
[250] "gad.sit_restless_hard_retro"
[251] "gad.becoming_easily_annoyed_or_irritable_retro"
[252] "gad.awful_feeling_afraid_happen_retro"
[253] "gad.feeling_nervous_anxious_or_on_edge_base"
[254] "gad.control_worrying_stop_base"
[255] "gad.worrying_too_much_about_different_things_base"
[256] "gad.trouble_relaxing_base"
[257] "gad.sit_restless_hard_base"
[258] "gad.becoming_easily_annoyed_or_irritable_base"
[259] "gad.awful_feeling_afraid_happen_base"
[260] "gad.problems_made_difficult_care_numeric"
[261] "gad.pandemic_felt_feelings_numeric"
[262] "gad.feeling_nervous_anxious_or_on_edge_retro_numeric"
[263] "gad.control_worrying_stop_retro_numeric"
[264] "gad.worrying_too_much_about_different_things_retro_numeric"
[265] "gad.trouble_relaxing_retro_numeric"
[266] "gad.sit_restless_hard_retro_numeric"
[267] "gad.becoming_easily_annoyed_or_irritable_retro_numeric"
[268] "gad.awful_feeling_afraid_happen_retro_numeric"
[269] "gad.feeling_nervous_anxious_or_on_edge_base_numeric"
[270] "gad.control_worrying_stop_base_numeric"
[271] "gad.worrying_too_much_about_different_things_base_numeric"
[272] "gad.trouble_relaxing_base_numeric"
[273] "gad.sit_restless_hard_base_numeric"
[274] "gad.becoming_easily_annoyed_or_irritable_base_numeric"
[275] "gad.awful_feeling_afraid_happen_base_numeric"
[276] "gad.sum_score_retro_raw"
[277] "gad.sum_score_base_raw"
[278] "na_per_person_gad_base"
[279] "na_per_person_gad_retro"
[280] "gad.sum_score_base"
[281] "gad.sum_score_retro"
[282] "pcl.stressful_experience_repeated_images_base"
[283] "pcl.stressful_experience_upset_reminded_base"
[284] "pcl.stressful_situation_avoiding_activities_base"
[285] "pcl.cut_people_feeling_distant_base"
[286] "pcl.feeling_irritable_or_having_angry_outbursts_base"
[287] "pcl.difficulty_concentrating_base"
[288] "pcl.stressful_experience_repeated_images_retro"
[289] "pcl.stressful_experience_upset_reminded_retro"
[290] "pcl.stressful_situation_avoiding_activities_retro"
[291] "pcl.cut_people_feeling_distant_retro"
[292] "pcl.feeling_irritable_or_having_angry_outbursts_retro"
[293] "pcl.difficulty_concentrating_retro"
[294] "pcl.stressful_experience_repeated_images_base_numeric"
[295] "pcl.stressful_experience_upset_reminded_base_numeric"
[296] "pcl.stressful_situation_avoiding_activities_base_numeric"
[297] "pcl.cut_people_feeling_distant_base_numeric"
[298] "pcl.feeling_irritable_or_having_angry_outbursts_base_numeric"
[299] "pcl.difficulty_concentrating_base_numeric"
[300] "pcl.stressful_experience_repeated_images_retro_numeric"
[301] "pcl.stressful_experience_upset_reminded_retro_numeric"
[302] "pcl.stressful_situation_avoiding_activities_retro_numeric"
[303] "pcl.cut_people_feeling_distant_retro_numeric"
[304] "pcl.feeling_irritable_or_having_angry_outbursts_retro_numeric"
[305] "pcl.difficulty_concentrating_retro_numeric"
[306] "pcl.sum_score_retro_raw"
[307] "pcl.sum_score_base_raw"
[308] "na_per_person_pcl_base"
[309] "na_per_person_pcl_retro"
[310] "pcl.sum_score_base"
[311] "pcl.sum_score_retro"
[312] "phq.problems_made_difficult_care"
[313] "phq.pandemic_felt_feelings"
[314] "phq.little_interest_or_pleasure_in_doing_things_retro"
[315] "phq.feeling_down_depressed_or_hopeless_retro"
[316] "phq.staying_asleep_sleeping_trouble_retro"
[317] "phq.feeling_tired_or_having_little_energy_retro"
[318] "phq.poor_appetite_or_overeating_retro"
[319] "phq.feeling_bad_failure_family_retro"
[320] "phq.trouble_concentrating_reading_newspaper_retro"
[321] "phq.moving_fidgety_noticed_opposite_retro"
[322] "phq.dead_hurting_thoughts_retro"
[323] "phq.little_interest_or_pleasure_in_doing_things_base"
[324] "phq.feeling_down_depressed_or_hopeless_base"
[325] "phq.staying_asleep_sleeping_trouble_base"
[326] "phq.feeling_tired_or_having_little_energy_base"
[327] "phq.poor_appetite_or_overeating_base"
[328] "phq.feeling_bad_failure_family_base"
[329] "phq.trouble_concentrating_reading_newspaper_base"
[330] "phq.moving_fidgety_noticed_opposite_base"
[331] "phq.dead_hurting_thoughts_base"
[332] "phq.problems_made_difficult_care_numeric"
[333] "phq.pandemic_felt_feelings_numeric"
[334] "phq.little_interest_or_pleasure_in_doing_things_retro_numeric"
[335] "phq.feeling_down_depressed_or_hopeless_retro_numeric"
[336] "phq.staying_asleep_sleeping_trouble_retro_numeric"
[337] "phq.feeling_tired_or_having_little_energy_retro_numeric"
[338] "phq.poor_appetite_or_overeating_retro_numeric"
[339] "phq.feeling_bad_failure_family_retro_numeric"
[340] "phq.trouble_concentrating_reading_newspaper_retro_numeric"
[341] "phq.moving_fidgety_noticed_opposite_retro_numeric"
[342] "phq.dead_hurting_thoughts_retro_numeric"
[343] "phq.little_interest_or_pleasure_in_doing_things_base_numeric"
[344] "phq.feeling_down_depressed_or_hopeless_base_numeric"
[345] "phq.staying_asleep_sleeping_trouble_base_numeric"
[346] "phq.feeling_tired_or_having_little_energy_base_numeric"
[347] "phq.poor_appetite_or_overeating_base_numeric"
[348] "phq.feeling_bad_failure_family_base_numeric"
[349] "phq.trouble_concentrating_reading_newspaper_base_numeric"
[350] "phq.moving_fidgety_noticed_opposite_base_numeric"
[351] "phq.dead_hurting_thoughts_base_numeric"
[352] "phq.sum_score_retro_raw"
[353] "phq.sum_score_base_raw"
[354] "na_per_person_phq_retro"
[355] "phq.missing_only_suicide_item_retro"
[356] "na_per_person_phq_base"
[357] "phq.missing_only_suicide_item_base"
[358] "phq.sum_score_base"
[359] "phq.sum_score_8items_base"
[360] "phq.sum_score_retro"
[361] "phq.sum_score_8items_retro"
[362] "ocir.felt_pandemic_feelings"
[363] "ocir.i_repeatedly_check_doors_windows_drawers_etc_retro"
[364] "ocir.arranged_things_change_upset_retro"
[365] "ocir.repeat_feel_numbers_retro"
[366] "ocir.clean_simply_wash_feel_retro"
[367] "ocir.mind_upset_unpleasant_thoughts_retro"
[368] "ocir.afraid_avoid_throwing_things_retro"
[369] "ocir.light_switches_water_taps_retro"
[370] "ocir.arranged_things_retro"
[371] "ocir.good_feel_bad_numbers_retro"
[372] "ocir.hands_longer_wash_retro"
[373] "ocir.saved_things_retro"
[374] "ocir.frequently_difficulty_rid_nasty_retro"
[375] "ocir.i_check_things_more_often_than_necessary_retro"
[376] "ocir.arranged_properly_objects_upset_retro"
[377] "ocir.feel_compelled_count_things_retro"
[378] "ocir.strangers_touch_touched_difficult_retro"
[379] "ocir.control_difficult_find_thoughts_retro"
[380] "ocir.i_collect_things_i_dont_need_retro"
[381] "ocir.i_repeatedly_check_doors_windows_drawers_etc_base"
[382] "ocir.arranged_things_change_upset_base"
[383] "ocir.repeat_feel_numbers_base"
[384] "ocir.clean_simply_wash_feel_base"
[385] "ocir.mind_upset_unpleasant_thoughts_base"
[386] "ocir.afraid_avoid_throwing_things_base"
[387] "ocir.light_switches_water_taps_base"
[388] "ocir.arranged_things_base"
[389] "ocir.good_feel_bad_numbers_base"
[390] "ocir.hands_longer_wash_base"
[391] "ocir.saved_things_base"
[392] "ocir.frequently_difficulty_rid_nasty_base"
[393] "ocir.i_check_things_more_often_than_necessary_base"
[394] "ocir.arranged_properly_objects_upset_base"
[395] "ocir.feel_compelled_count_things_base"
[396] "ocir.strangers_touch_touched_difficult_base"
[397] "ocir.control_difficult_find_thoughts_base"
[398] "ocir.i_collect_things_i_dont_need_base"
[399] "ocir.felt_pandemic_feelings_numeric"
[400] "ocir.i_repeatedly_check_doors_windows_drawers_etc_retro_numeric"
[401] "ocir.arranged_things_change_upset_retro_numeric"
[402] "ocir.repeat_feel_numbers_retro_numeric"
[403] "ocir.clean_simply_wash_feel_retro_numeric"
[404] "ocir.mind_upset_unpleasant_thoughts_retro_numeric"
[405] "ocir.afraid_avoid_throwing_things_retro_numeric"
[406] "ocir.light_switches_water_taps_retro_numeric"
[407] "ocir.arranged_things_retro_numeric"
[408] "ocir.good_feel_bad_numbers_retro_numeric"
[409] "ocir.hands_longer_wash_retro_numeric"
[410] "ocir.saved_things_retro_numeric"
[411] "ocir.frequently_difficulty_rid_nasty_retro_numeric"
[412] "ocir.i_check_things_more_often_than_necessary_retro_numeric"
[413] "ocir.arranged_properly_objects_upset_retro_numeric"
[414] "ocir.feel_compelled_count_things_retro_numeric"
[415] "ocir.strangers_touch_touched_difficult_retro_numeric"
[416] "ocir.control_difficult_find_thoughts_retro_numeric"
[417] "ocir.i_collect_things_i_dont_need_retro_numeric"
[418] "ocir.i_repeatedly_check_doors_windows_drawers_etc_base_numeric"
[419] "ocir.arranged_things_change_upset_base_numeric"
[420] "ocir.repeat_feel_numbers_base_numeric"
[421] "ocir.clean_simply_wash_feel_base_numeric"
[422] "ocir.mind_upset_unpleasant_thoughts_base_numeric"
[423] "ocir.afraid_avoid_throwing_things_base_numeric"
[424] "ocir.light_switches_water_taps_base_numeric"
[425] "ocir.arranged_things_base_numeric"
[426] "ocir.good_feel_bad_numbers_base_numeric"
[427] "ocir.hands_longer_wash_base_numeric"
[428] "ocir.saved_things_base_numeric"
[429] "ocir.frequently_difficulty_rid_nasty_base_numeric"
[430] "ocir.i_check_things_more_often_than_necessary_base_numeric"
[431] "ocir.arranged_properly_objects_upset_base_numeric"
[432] "ocir.feel_compelled_count_things_base_numeric"
[433] "ocir.strangers_touch_touched_difficult_base_numeric"
[434] "ocir.control_difficult_find_thoughts_base_numeric"
[435] "ocir.i_collect_things_i_dont_need_base_numeric"
[436] "ocir.sum_score_retro_raw"
[437] "ocir.sum_score_base_raw"
[438] "na_per_person_ocir_retro"
[439] "na_per_person_ocir_base"
[440] "ocir.sum_score_base"
[441] "ocir.sum_score_retro"
[442] "alsfrs.limb_weakness_noticed_past"
[443] "alsfrs.normal"
[444] "alsfrs.slow_or_sloppy_all_words_are_legible"
[445] "alsfrs.not_all_words_are_legible"
[446] "alsfrs.able_to_grip_pen"
[447] "alsfrs.unable_to_grip_pen"
[448] "alsfrs.have_you_noticed_any_difficulty_walking"
[449] "alsfrs.do_you_have_any_difficulty_climbing_stairs"
[450] "alsfrs.limb_weakness_noticed_past_numeric"
[451] "alsfrs.normal_numeric"
[452] "alsfrs.slow_or_sloppy_all_words_are_legible_numeric"
[453] "alsfrs.not_all_words_are_legible_numeric"
[454] "alsfrs.able_to_grip_pen_numeric"
[455] "alsfrs.unable_to_grip_pen_numeric"
[456] "alsfrs.have_you_noticed_any_difficulty_walking_numeric"
[457] "alsfrs.do_you_have_any_difficulty_climbing_stairs_numeric"
[458] "ess.felt_excessively_sleepy_past"
[459] "ess.sitting_and_reading"
[460] "ess.watching_tv"
[461] "ess.sitting_inactive_in_a_public_place"
[462] "ess.break_passenger_car_hour"
[463] "ess.afternoon_rest_circumstances_lying"
[464] "ess.sitting_and_talking_to_someone"
[465] "ess.sitting_quietly_after_a_lunch_without_alcohol"
[466] "ess.car_minutes_stopped_traffic"
[467] "ess.insomnia"
[468] "ess.narcolepsy"
[469] "ess.rem_sleep_behaviour_disorder"
[470] "ess.restless_legs_syndrome"
[471] "ess.sleep_apnea"
[472] "ess.sleep_terrors"
[473] "ess.sleepwalking"
[474] "ess.other"
[475] "ess.none"
[476] "ess.felt_excessively_sleepy_past_numeric"
[477] "ess.sitting_and_reading_numeric"
[478] "ess.watching_tv_numeric"
[479] "ess.sitting_inactive_in_a_public_place_numeric"
[480] "ess.break_passenger_car_hour_numeric"
[481] "ess.afternoon_rest_circumstances_lying_numeric"
[482] "ess.sitting_and_talking_to_someone_numeric"
[483] "ess.sitting_quietly_after_a_lunch_without_alcohol_numeric"
[484] "ess.car_minutes_stopped_traffic_numeric"
[485] "ess.insomnia_numeric"
[486] "ess.narcolepsy_numeric"
[487] "ess.rem_sleep_behaviour_disorder_numeric"
[488] "ess.restless_legs_syndrome_numeric"
[489] "ess.sleep_apnea_numeric"
[490] "ess.sleep_terrors_numeric"
[491] "ess.sleepwalking_numeric"
[492] "ess.other_numeric"
[493] "ess.none_numeric"
[494] "midas.headaches_suffered_past_month"
[495] "midas.days_past_month_miss_work_school"
[496] "midas.days_past_month_work_school_half_productivity"
[497] "midas.days_past_month_miss_housework"
[498] "midas.days_past_month_housework_half_productivity"
[499] "midas.days_past_month_miss_social_activities"
[500] "midas.headaches_suffered_past_month_numeric"
[501] "midas.days_past_month_miss_work_school_numeric"
[502] "midas.days_past_month_work_school_half_productivity_numeric"
[503] "midas.days_past_month_miss_housework_numeric"
[504] "midas.days_past_month_housework_half_productivity_numeric"
[505] "midas.days_past_month_miss_social_activities_numeric"
[506] "nmss.ability_taste_food_smell"
[507] "nmss.severe_taste_smell_loss"
[508] "nmss.ability_taste_food_smell_numeric"
[509] "nmss.severe_taste_smell_loss_numeric"
[510] "nmsw.drink_problems_choking_difficulty"
[511] "nmsw.regularly_night_pass_urine"
[512] "nmsw.sex_difficult_finding"
[513] "nmsw.weak_standing_feeling_light"
[514] "nmsw.acting_moving_sleep_talking"
[515] "nmsw.double_vision"
[516] "nmsw.drink_problems_choking_difficulty_numeric"
[517] "nmsw.regularly_night_pass_urine_numeric"
[518] "nmsw.sex_difficult_finding_numeric"
[519] "nmsw.weak_standing_feeling_light_numeric"
[520] "nmsw.acting_moving_sleep_talking_numeric"
[521] "nmsw.double_vision_numeric"
[522] "tinnitus.ears_noises_minutes_head"
[523] "tinnitus.ears_noises_minutes_head_frequency"
[524] "tinnitus.noises_worry_worst_upset"
[525] "tinnitus.ears_noises_minutes_head_numeric"
[526] "tinnitus.ears_noises_minutes_head_frequency_numeric"
[527] "tinnitus.noises_worry_worst_upset_numeric"
[528] "ID.dup"
[529] "prepandemic_january_31_numeric"
[530] "prepandemic_january_31"
[531] "prepandemic_march_1_numeric"
[532] "prepandemic_march_1"
[533] "prepandemic_march_23_numeric"
[534] "prepandemic_march_23"
[535] "time_diff_coping_lockdown_march_23"
[536] "time_diff_coping_awareness_march_1"
[537] "time_diff_coping_first_case_uk_jan_31"
[538] "time_diff_signup_lockdown_march_23"
[539] "time_diff_signup_awareness_march_1"
[540] "time_diff_signup_first_case_uk_jan_31"
[541] "time_diff_sign_up_coping"
[542] "phq.diff_score_retro_prepan"
[543] "phq.diff_score_base_prepan"
[544] "phq.diff_score_base_retro"
[545] "gad.diff_score_retro_prepan"
[546] "gad.diff_score_base_prepan"
[547] "gad.diff_score_base_retro"
[548] "pcl.diff_score_base_prepan"
[549] "ocir.diff_score_retro_prepan"
[550] "ocir.diff_score_base_prepan"
[551] "ocir.diff_score_base_retro"
[552] "data_group_phq_numeric"
[553] "data_group_phq"
[554] "data_group_gad_numeric"
[555] "data_group_gad"
[556] "data_group_pcl_numeric"
[557] "data_group_pcl"
[558] "data_group_ocir_numeric"
[559] "data_group_ocir"
[560] "respiratory.breath_diarrhoea_fatigue_fever"
[561] "respiratory.worst_ill_feel"
[562] "respiratory.persistent_cough"
[563] "respiratory.skipping_meals_because_you_felt_unwell"
[564] "respiratory.was_your_sense_of_smell_impaired"
[565] "respiratory.was_your_sense_of_taste_impaired"
[566] "respiratory.feeling_tiredfatigued"
[567] "respiratory.throat_swab_coronavirus_nose"
[568] "respiratory.throat_swab_test_nose"
[569] "respiratory.coronavirus_antibody_test"
[570] "respiratory.results_antibody_test"
[571] "respiratory.breath_diarrhoea_fatigue_fever_numeric"
[572] "respiratory.worst_ill_feel_numeric"
[573] "respiratory.persistent_cough_numeric"
[574] "respiratory.skipping_meals_because_you_felt_unwell_numeric"
[575] "respiratory.was_your_sense_of_smell_impaired_numeric"
[576] "respiratory.was_your_sense_of_taste_impaired_numeric"
[577] "respiratory.feeling_tiredfatigued_numeric"
[578] "respiratory.throat_swab_coronavirus_nose_numeric"
[579] "respiratory.throat_swab_test_nose_numeric"
[580] "respiratory.coronavirus_antibody_test_numeric"
[581] "respiratory.results_antibody_test_numeric"
[582] "respiratory.anosmia_binary"
[583] "respiratory.pcough_binary"
[584] "respiratory.fatigue_binary"
[585] "respiratory.skipped_meals_binary"
[586] "Sex_respiratory"
[587] "Age_respiratory"
[588] "covid_symptoms"
[589] "covid_probability"
[590] "covid_odds_ratio"
[591] "covid_odds_ratio_50_numeric"
[592] "covid_odds_ratio_50"
[593] "covid_probable_case_incl_screening_numeric"
[594] "covid_probable_case_incl_screening"
[595] "COPING_ID"
[596] "Birthyear_unc"
[597] "Birthmonth"
[598] "Birthday"
[599] "Birthyear_unc_numeric"
[600] "Birthmonth_numeric"
[601] "Birthday_numeric"
[602] "Birthyear_numeric"
[603] "Birthdate"
[604] "Cohort"
[605] "Ethnicity.unc"
[606] "Cohort_numeric"
[607] "Ethnicity.unc_numeric"
[608] "Ethnicity_full"
[609] "Transgender_uncleaned"
[610] "Transgender_uncleaned_numeric"
[611] "employment.what_is_your_highest_level_of_education"
[612] "employment.what_is_your_highest_level_of_education_numeric"
[613] "respiratory.coronavirus_week_antibody_test"
[614] "respiratory.coronavirus_week_antibody_test_numeric"
[615] "covid_test_positive_double_numeric"
[616] "covid_test_positive_double"
[617] "gad.covid_test_positive_numeric"
[618] "covid_test_positive"
[619] "age_category_collapsed_numeric"
[620] "age_category_collapsed"
[621] "age_category_collapsed_reordered"
[622] "Gender_collapsed_numeric"
[623] "Gender_collapsed"
[624] "Ethnicity_collapsed_numeric"
[625] "Ethnicity_collapsed"
[626] "Disorder_hierarchical_psychosis_numeric"
[627] "Disorder_hierarchical_psychosis"
[628] "Disorder_hierarchical_numeric"
[629] "Disorder_hierarchical"
[630] "gad.change_binary_numeric"
[631] "gad.change_binary"
[632] "phq.change_binary_numeric"
[633] "phq.change_binary"
[634] "ocir.change_binary_numeric"
[635] "ocir.change_binary"
[636] "prepandemic_3_months_numeric"
[637] "prepandemic_3_months"
[638] "prepandemic_6_months_numeric"
[639] "prepandemic_6_months"
[640] "prepandemic_9_months_numeric"
[641] "prepandemic_9_months"
[1] "gad.sum_score_prepan" "pcl.sum_score_prepan"
[3] "phq.sum_score_prepan" "phq.sum_score_8items_prepan"
[5] "ocir.sum_score_prepan" "gad.sum_score_base"
[7] "gad.sum_score_retro" "pcl.sum_score_base"
[9] "pcl.sum_score_retro" "phq.sum_score_base"
[11] "phq.sum_score_8items_base" "phq.sum_score_retro"
[13] "phq.sum_score_8items_retro" "ocir.sum_score_base"
[15] "ocir.sum_score_retro"
[1] "phq.sum_score_prepan" "phq.sum_score_base" "phq.sum_score_retro"
[1] "gad.sum_score_prepan" "gad.sum_score_base" "gad.sum_score_retro"
[1] "ocir.sum_score_prepan" "ocir.sum_score_base" "ocir.sum_score_retro"
[1] "pcl.sum_score_prepan" "pcl.sum_score_base" "pcl.sum_score_retro"
[1] "phq.diff_score_retro_prepan" "phq.diff_score_base_prepan"
[3] "phq.diff_score_base_retro" "gad.diff_score_retro_prepan"
[5] "gad.diff_score_base_prepan" "gad.diff_score_base_retro"
[7] "pcl.diff_score_base_prepan" "ocir.diff_score_retro_prepan"
[9] "ocir.diff_score_base_prepan" "ocir.diff_score_base_retro"
[1] "phq.diff_score_retro_prepan" "phq.diff_score_base_prepan"
[3] "phq.diff_score_base_retro"
[1] "gad.diff_score_retro_prepan" "gad.diff_score_base_prepan"
[3] "gad.diff_score_base_retro"
[1] "ocir.diff_score_retro_prepan" "ocir.diff_score_base_prepan"
[3] "ocir.diff_score_base_retro"
#ANALYSIS PLAN 1. Calculate mean change per disorder group i. Disorders (9) a. Rank the disorders by the size of the change ii. Sex iii. Age (13; RAMP; potentially collapse above 65 depending on group sizes) iv. Ethnicity groups (5; White European, Black (British), Asian, Arab, Mixed)
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Table for knitting gad sum score summary table
| Change | Variable | Min | Max | Mean | Median | SD | Skew | Kurtosis |
|---|---|---|---|---|---|---|---|---|
| No change | Base | 0 | 21 | 2.665863 | 0.0 | 4.451322 | 2.1775181 | 4.4518534 |
| No change | Prepan | 0 | 21 | 8.254932 | 7.0 | 6.202852 | 0.4754996 | -0.9032129 |
| No change | Retro | Inf | -Inf | NaN | NA | NA | NA | NA |
| Worsening | Base | 0 | 21 | 8.695957 | 7.0 | 5.696058 | 0.5245479 | -0.8011604 |
| Worsening | Prepan | 0 | 21 | 9.403875 | 8.0 | 5.859497 | 0.3389671 | -0.9329372 |
| Worsening | Retro | 0 | 21 | 4.638103 | 4.0 | 4.279377 | 1.3752419 | 1.9313176 |
| Improvement | Base | 0 | 21 | 4.771279 | 3.0 | 4.830869 | 1.3672217 | 1.5731623 |
| Improvement | Prepan | 0 | 21 | 9.228041 | 8.0 | 5.817921 | 0.3295928 | -0.9032305 |
| Improvement | Retro | 0 | 21 | 8.362857 | 7.0 | 5.468934 | 0.5124932 | -0.5869968 |
| NA | Base | 0 | 21 | 5.700000 | 4.5 | 5.994045 | 1.0357477 | 0.1012029 |
| NA | Prepan | 0 | 21 | 10.000000 | 13.0 | 8.563488 | -0.0313927 | -1.9895986 |
| NA | Retro | Inf | -Inf | NaN | NA | NA | NA | NA |
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in min(., na.rm = T): no non-missing arguments to min; returning Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Warning in max(., na.rm = T): no non-missing arguments to max; returning -Inf
Table for knitting gad diff summary table
| Change | Variable | Min | Max | Mean | Median | SD | Skew | Kurtosis |
|---|---|---|---|---|---|---|---|---|
| No change | Base - prepan | -21 | 20 | -2.0498783 | -1 | 4.730325 | -0.4870231 | 1.5079948 |
| No change | Base - retro | Inf | -Inf | NaN | NA | NA | NA | NA |
| No change | Prepan - retro | Inf | -Inf | NaN | NA | NA | NA | NA |
| Worsening | Base - prepan | -18 | 21 | 0.9694803 | 1 | 5.309832 | -0.0145504 | 0.6007935 |
| Worsening | Base - retro | -21 | 21 | 4.0587466 | 3 | 4.286868 | 0.7700269 | 0.8792915 |
| Worsening | Prepan - retro | -21 | 18 | -3.5772884 | -3 | 5.108094 | -0.2892807 | 0.4412892 |
| Improvement | Base - prepan | -21 | 12 | -4.0760778 | -3 | 5.490428 | -0.2970813 | 0.1264514 |
| Improvement | Base - retro | -21 | 21 | -3.5866667 | -3 | 5.322797 | 0.4752668 | 2.1484694 |
| Improvement | Prepan - retro | -21 | 20 | 0.3536379 | 1 | 5.692678 | -0.1576467 | 0.8754152 |
| NA | Base - prepan | -9 | 6 | -1.5000000 | -2 | 5.431390 | 0.0468089 | -1.6798094 |
| NA | Base - retro | Inf | -Inf | NaN | NA | NA | NA | NA |
| NA | Prepan - retro | Inf | -Inf | NaN | NA | NA | NA | NA |
makes this into percentages
Warning: Removed 56536 rows containing non-finite values (stat_count).
Warning: Removed 33099 rows containing non-finite values (stat_bin).
Warning: Removed 33099 rows containing non-finite values (stat_bin).
Warning: Removed 23437 rows containing non-finite values (stat_bin).
Warning: Removed 33099 rows containing non-finite values (stat_bin).
Warning: Removed 33099 rows containing non-finite values (stat_bin).
Warning: `fun.y` is deprecated. Use `fun` instead.
Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
Warning: `fun.ymax` is deprecated. Use `fun.max` instead.
Warning: Removed 33099 rows containing non-finite values (stat_ydensity).
Warning: Removed 33099 rows containing non-finite values (stat_summary).
Warning: Removed 33099 rows containing missing values (geom_point).
Warning: `fun.y` is deprecated. Use `fun` instead.
Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
Warning: `fun.ymax` is deprecated. Use `fun.max` instead.
Warning: Removed 33099 rows containing non-finite values (stat_ydensity).
Warning: Removed 33099 rows containing non-finite values (stat_summary).
Warning: Removed 33099 rows containing missing values (geom_point).
Warning: `fun.y` is deprecated. Use `fun` instead.
Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
Warning: `fun.ymax` is deprecated. Use `fun.max` instead.
Warning: Removed 33099 rows containing non-finite values (stat_ydensity).
Warning: Removed 33099 rows containing non-finite values (stat_summary).
Warning: Removed 33099 rows containing missing values (geom_point).
Warning: `fun.y` is deprecated. Use `fun` instead.
Warning: `fun.ymin` is deprecated. Use `fun.min` instead.
Warning: `fun.ymax` is deprecated. Use `fun.max` instead.
Warning: Removed 33099 rows containing non-finite values (stat_ydensity).
Warning: Removed 33099 rows containing non-finite values (stat_summary).
Warning: Removed 33099 rows containing missing values (geom_point).